home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1993 / The Association of Shareware Professionals Advantage CD-ROM 1993.iso / files / utilties / listr311 / listrcmd.c < prev    next >
Text File  |  1992-07-05  |  3KB  |  75 lines

  1. ***************************************************************
  2. * LISTRCMD.C is a sample setup or command file that might be  *
  3. *  used to print C program listings.  The only part that is   *
  4. *  unique to the C language is the definition of AltCmdLead   *
  5. *  to allow LISTR commands in the listed file.  The rest of   *
  6. *  this command file might be used with any ASCII file.       *
  7. *                                                             *
  8. *  This file sets the printer up to print at 12 characters    *
  9. *  per inch, and 8 lines per inch.  This allows lines with up *
  10. *  to 86 characters to print without wrapping, and gets       *
  11. *  nearly 80 lines on the page.  You will undoubtedly have to *
  12. *  modify the printer control codes to suit your printer.     *
  13. *                                                             *
  14. *  LISTR will use this command file while printing any file   *
  15. *  with the .C extension if this command file is in the       *
  16. *  current directory, or in the directory pointed to by the   *
  17. *  LISTRCMD variable in the DOS environment.  See the COMMAND *
  18. *  FILES section of LISTR.DOC for more information.           *
  19. ***************************************************************
  20. *  bwm  2-22-92                                               *
  21. ***************************************************************
  22. *
  23. *  Start each included file (if any) with page number 1
  24. *
  25. ..NewFilePg 1
  26. *
  27. *  Setup the page to handle 12 cpi printing.  Uses 86 text
  28. *  columns, with a left margin of 8 characters.  PageCols
  29. *  must be set to 102 (or greater than 86+8 at least) before
  30. *  setting TextLen to avoid an error.
  31. *
  32. ..PageCols 102
  33. ..TextLen 86
  34. ..LeftMgn 8
  35. *
  36. *  Set the page length and bottom line for 8 lpi printing.
  37. *  PageLines must be set before BotLine to avoid an error.
  38. *
  39. ..PageLines 88
  40. ..BotLine 83
  41. *
  42. *  Include a top title with the file name, date and time
  43. *
  44. ..Title  2  /Listing of//@Mfn:  @mdl:  @mt12:/
  45. *
  46. *  Include a bottom title with listing date and time, and
  47. *  the page number.
  48. *
  49. ..Title 85  /Listed @cdl:  at  @ct12://Page @pg/
  50. *
  51. *  Turn Wrap on, so long lines will not be truncated.
  52. *  Setting WrapIndent to 2 causes the wrapped part of a
  53. *  line to be indented relative to the first character
  54. *  on the first part of the line.
  55. *
  56. ..Wrap ON
  57. ..WrapIndent 2
  58. *
  59. *  Set the alternate command lead to '/*!' so that LISTR
  60. *  commands can be included in the program as comments.
  61. *  A LISTR command would be entered as:
  62. *                     /*! LeftMgn 90 */
  63. *
  64. ..AltCmdLead /*!
  65. *
  66. *  Magic incantations to the printer using SetupStrg.
  67. *  Modify this part to get the desired result on your
  68. *  printer.  These codes work on the NEC P6 (which is
  69. *  compatible with many dot matrix printers).
  70. *
  71.    [Select 12 cpi printing] ESC 'P'
  72. ..SetupStrg 27 'M'
  73.    [Select 8 lpi printing] ESC '0'
  74. ..SetupStrg 27 '0'
  75.